{% if site.data.locales[page.lang].search %}
  {% assign cx_id = site.data.locales[page.lang].search.cx_id %}
  {% assign text = site.data.locales[page.lang].search.text %}
{% else %}
  {% assign text = site.data.locales['en'].search.text %}
{% endif%}
<form id="search-form" action="https://www.google.com/cse">
  <table class="fieldset">
    <tr>
      <td>
        <input class="field" type="text" name="q" size="31" style="background: white url(//www.google.com/coop/intl/{{ page.lang }}/images/google_custom_search_watermark.gif) left no-repeat" onfocus="this.style.background='white'" onblur="if (/^\s*$/.test(this.value)) this.style.background='white url(//www.google.com/coop/intl/{{ page.lang }}/images/google_custom_search_watermark.gif) left no-repeat'"/>
      </td>
      <td>
        {% if cx_id %}<input type="hidden" name="cx" value="{{ cx_id }}" />{% endif %}
        <input type="hidden" name="ie" value="UTF-8" />
        <input class="button" type="submit" name="sa" value="{{ text }}" />
      </td>
    </tr>
  </table>
</form>
